/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.odinproject.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 工程表Entity
 * @author vic.duan
 * @version 2018-03-12
 */
@Table(name="odin_project", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="项目名称", queryType=QueryType.LIKE),
		@Column(name="code", attrName="code", label="项目编码"),
		@Column(name="address", attrName="address", label="项目地址"),
		@Column(name="describe", attrName="describe", label="项目描述"),
		@Column(name="state", attrName="state", label="状态"),
	}, orderBy="a.id DESC"
)
public class OdinProject extends DataEntity<OdinProject> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 项目名称
	private String code;		// 项目编码
	private String address;		// 项目地址
	private String describe;		// 项目描述
	private String state;		// 状态
	
	public OdinProject() {
		this(null);
	}

	public OdinProject(String id){
		super(id);
	}
	
	@NotBlank(message="项目名称不能为空")
	@Length(min=0, max=255, message="项目名称长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="项目编码不能为空")
	@Length(min=0, max=255, message="项目编码长度不能超过 255 个字符")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=255, message="项目地址长度不能超过 255 个字符")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=0, max=1024, message="项目描述长度不能超过 1024 个字符")
	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}
	
	@Length(min=0, max=255, message="状态长度不能超过 255 个字符")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
}